package cn.net.shuxing.yifu.common.service;

import cn.net.shuxing.yifu.common.bean.UserPassword;
import cn.net.shuxing.yifu.common.mapper.UserPasswordMapper;
import org.springframework.stereotype.Service;

@Service
public class UserPasswordService extends BaseService<UserPassword,UserPasswordMapper> {

    public void open(Integer userId)
    {
        UserPassword userPassword = getByPrimaryKey(userId);
        userPassword.setRequired(1);
        update(userPassword);
    }

    public void close(Integer userId)
    {
        UserPassword userPassword = getByPrimaryKey(userId);
        userPassword.setRequired(0);
        update(userPassword);
    }

}
